export const sortSelect = (array: number[]): number[] => {
  const length = array.length;
  
  for (let i = 0; i < length; i++) {
    let minIndex = i;
    for (let j = i; j < length; j++) {
      if (array[j] < array[minIndex]) {
        minIndex = j;
      }
    }
    const minValue = array[minIndex];
    array[minIndex] = array[i];
    array[i] = minValue;
  }
  
  return array;
};
